package com.campusbackend.mapper;

import com.campusbackend.entity.MemberRoles;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 队员身份字典表 Mapper 接口
 * </p>
 *
 * @author yezi
 * @since 2025-07-26
 */
@Mapper
public interface MemberRolesMapper extends BaseMapper<MemberRoles> {

    /**
     * 获取所有可用的队员角色
     * @return 角色列表
     */
    @Select("SELECT * FROM member_roles WHERE status = 1 ORDER BY sort_order ASC")
    List<MemberRoles> getAllActiveRoles();
}
